<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:o="http://openfaces.org/"
      xmlns:ui="http://java.sun.com/jsf/facelets">

	<head>
	</head>

	<body>
		<ui:composition template="/templates/default.xhtml">
			<ui:define name="title">OpenHDS - Pregnancy Observation Details</ui:define>
			
			<ui:param name="crud" value="#{pregnancyObservationCrud}" />
			
		    <ui:define name="listing">
		        <ui:include src="list.xhtml" />
		    </ui:define>
	
			<ui:define name="display">
			
				<h:outputText value="#{navController.breadcrumbTrail}" />		
			
				<h1>#{msg.pregnancyObservationDetail}</h1>
				<h:form>
	
					<h:outputText styleClass="error" value="#{pregnancyObservationCrud.item.statusMessage}" />
					
		            <h:panelGrid columns="3">
		            	<f:verbatim><h3>Basic Information</h3></f:verbatim>
		            	<h:outputText />
		            	<h:outputText />
		            	
		            	<h:outputText value="#{msg.fieldWorkerId}:"/>
		                <h:outputText />
		                <h:outputText value="#{pregnancyObservationCrud.item.collectedBy}" converter="#{fieldWorkerExtIdConverter}" />
		                
		            	<h:outputText value="#{msg.pregnancyObservationRecordedDate}:"/>
		                <h:outputText />
		                <h:outputText value="#{pregnancyObservationCrud.item.recordedDate}" converter="#{calendarConverter}" />
		                
		                <h:outputText value="Permanent ID of pregnant woman:"/>
		                <h:outputText />
		                <h:outputText value="#{pregnancyObservationCrud.item.mother}" converter="#{individualExtIdConverter}" />
		                
		                <h:outputText value="Name of Pregnant Woman:"/>
		                <h:outputText />
		                <h:outputText value="#{pregnancyObservationCrud.item.pregWomanName}" />
		                
		                <h:outputText value="Number of months of pregnancy:"/>
		                <h:outputText />
		                <h:outputText id="numMonthsPreg" value="#{pregnancyObservationCrud.item.numMonthsOfPregnancy}" />
		                
		                <h:outputText value="Have you ever attended any Anti-Natal Clinic?:" />
		             	<img class="clickable" onclick="O$('popupWindowForYesNo').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
		             	<h:outputText value="#{pregnancyObservationCrud.item.attendedAnteNatalClinic}" />
		                
		                <h:outputText value="Which health facility did you attend?:"/>
		                <img class="clickable" onclick="O$('popupWindowForHealthFacility').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
		                <h:outputText id="healthFacility" value="#{pregnancyObservationCrud.item.healthFacility}" />
		
		            	<h:outputText value="If other, please specify the health facility:"/>
		                <h:outputText />
		                <h:outputText id="healthFacilityOther" value="#{pregnancyObservationCrud.item.healthFacilityOther}" />
		                
		                <h:outputText value="Have you received TT injection?:" />
		             	<img class="clickable" onclick="O$('popupWindowForYesNo').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
		             	<h:outputText value="#{pregnancyObservationCrud.item.receivedTTInjection}" />
		                
		                <h:outputText value="Estimated Date of Conception:"/>
		                <h:outputText />
		                <h:outputText value="#{pregnancyObservationCrud.item.estimatedDateOfConception}" converter="#{calendarConverter}" />

		                <h:outputText value="#{msg.pregnancyObservationEDD}:"/>
		                <h:outputText />
		                <h:outputText value="#{pregnancyObservationCrud.item.expectedDeliveryDate}" converter="#{calendarConverter}" />
		                
		                <h:outputText value="Is this your first pregnancy?:" />
             			<img class="clickable" onclick="O$('popupWindowForYesNo').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
             			<h:outputText value="#{pregnancyObservationCrud.item.firstPregnancy}" />
		                
		                <h:outputText value="#{msg.visitId}:"/>
						<h:outputText />
		                <h:outputText value="#{pregnancyObservationCrud.item.visit}" converter="#{visitExtIdConverter}" />
		             	
		             	<f:verbatim><h3>Source of Information</h3></f:verbatim>
		            	<h:outputText />
		            	<h:outputText />
		                
		                <h:outputText value="House Id:"/>
				        <h:outputText />
				        <h:outputText value="#{pregnancyObservationCrud.item.house}" converter="#{locationExtIdConverter}" />
								
						<h:outputText value="Household Id:"/>
				        <h:outputText />
				        <h:outputText value="#{pregnancyObservationCrud.item.household}" converter="#{socialGroupExtIdConverter}" autocomplete="off"/>
		
						<h:outputText value="Household Name:"/>
		                <h:outputText />
		                <h:outputText id="householdName" value="#{pregnancyObservationCrud.item.householdName}" />
		
		             	<h:outputText value="Reported By:"/>
		                <img class="clickable" onclick="O$('popupWindowForReportedBy').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
		               	<h:outputText value="#{pregnancyObservationCrud.item.reportedBy}" />  
	
		             	<h:outputText value="#{msg.insertDate}:"/>
			            <h:outputText />
			            <h:outputText value="#{pregnancyObservationCrud.item.insertDate}" converter="#{calendarConverter}" />
		             	
		             	<h:outputText value="#{msg.insertBy}:"/>
						<h:outputText />
						<h:outputText value="#{pregnancyObservationCrud.item.insertBy.fullName}" />
		
						<h:outputText value="#{msg.dataStatus}:"/>
				    	<img class="clickable" onclick="O$('popupWindowForDataStatus').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
						<h:outputText value="#{pregnancyObservationCrud.item.status}" />	
		             </h:panelGrid>
		            <br />
		            <h:commandButton action="#{pregnancyObservationCrud.editSetup}" value="#{msg.lblEdit}">
		                <f:setPropertyActionListener target="#{jsfService.itemId}" value="#{pregnancyObservationCrud.item.uuid}" />
		            </h:commandButton>
		            <h:outputText value=" " />
		            <h:commandButton value="Cancel" immediate="true" action="cancel" rendered="#{flowScope.updating}" />
	        	</h:form>
			</ui:define>		
		</ui:composition>
	</body>
</html>
